<template>
  <div>
    基础管理 -> 权限管理
    <Button
      type="primary"
      size="small"
      style="margin-right: 5px"
      @click="testUserLogin()">测试登陆</Button>
    <Button
      type="error"
      size="small"
      @click="testUserInfo()">测试用户信息</Button>
  </div>
</template>
<script>
import axios from 'axios'
export default {
  name: 'level_2_1',
  methods: {
    testUserInfo () {
      console.log('testUserInfo')
      axios.get('http://localhost:8088/backend-template/user/getUserInfo',{
        params: {token : 'eyJwYXNzIjoiYWRtaW4iLCJ1c2VyIjoiYWRtaW4ifQ=='}
      }).then(res => {
        console.log(res.data.data)
      })
    },
    testUserLogin () {
      console.log('testUserLogin')
      axios.post('http://localhost:8088/backend-template/user/userLogin',{
        name: 'admin',
        pass: 'admin'
      }).then(res => {
        console.log(res.data.data)
      })
    }
  }
}
</script>
